package org.jeecg.modules.htxincailiao.industry.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.htxincailiao.area.service.IHTAreaService;
import org.jeecg.modules.htxincailiao.industry.constant.HTDateStatusEnum;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.util.oConvertUtils;

import javax.annotation.Resource;

/**
 * @Description: ht_industry_meeting
 * @Author: jeecg-boot
 * @Date:   2022-07-14 09:38:00
 * @Version: V1.0
 */
@Data
@TableName("ht_industry_meeting")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ht_industry_meeting对象", description="ht_industry_meeting")
public class HTIndustryMeeting implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**创建者ID*/
	@Excel(name = "创建者ID", width = 15)
    @ApiModelProperty(value = "创建者ID")
    private String creatorId;

    @Excel(name = "标签ID", width = 15)
    @ApiModelProperty(value = "标签ID")
    private String tagId;

	/**主办方*/
	@Excel(name = "主办方", width = 15)
    @ApiModelProperty(value = "主办方")
    private String organizer;
	/**标题*/
	@Excel(name = "标题", width = 15)
    @ApiModelProperty(value = "标题")
    private String name;
	/**排序*/
	@Excel(name = "排序", width = 15)
    @ApiModelProperty(value = "排序")
    private Integer sort;
	/**首页排序*/
	@Excel(name = "首页排序", width = 15)
    @ApiModelProperty(value = "首页排序")
    private Integer homeSort;
	/**签到二维码*/
	@Excel(name = "签到二维码", width = 15)
    @ApiModelProperty(value = "签到二维码")
    private String checkQrcodeUrl;
	/**副标题*/
	@Excel(name = "副标题", width = 15)
    @ApiModelProperty(value = "副标题")
    private String subname;
	/**内容*/
	//@Excel(name = "内容", width = 15)
    @ApiModelProperty(value = "内容")
    private String content;
	/**封面*/
	@Excel(name = "封面", width = 15)
    @ApiModelProperty(value = "封面")
    private String cover;
	/**开始时间*/
	@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
	/**结束时间*/
	@Excel(name = "结束时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;
	/**省ID*/
	@Excel(name = "省ID", width = 15)
    @ApiModelProperty(value = "省ID")
    private String provinceId;
	/**市ID*/
	@Excel(name = "市ID", width = 15)
    @ApiModelProperty(value = "市ID")
    private String cityId;
	/**区ID*/
	@Excel(name = "区ID", width = 15)
    @ApiModelProperty(value = "区ID")
    private String districtId;
	/**街道地址*/
	@Excel(name = "街道地址", width = 15)
    @ApiModelProperty(value = "街道地址")
    private String streetAddress;
	/**楼/门牌号*/
	@Excel(name = "楼/门牌号", width = 15)
    @ApiModelProperty(value = "楼/门牌号")
    private String suiteAddress;
	/**展商参展费*/
	//@Excel(name = "展商参展费", width = 15)
    @ApiModelProperty(value = "展商参展费")
    private BigDecimal exhibitorCost;
	/**观众观展费*/
	//@Excel(name = "观众观展费", width = 15)
    @ApiModelProperty(value = "观众观展费")
    private BigDecimal audienceCost;
	/**审批者ID*/
	@Excel(name = "审批者ID", width = 15)
    @ApiModelProperty(value = "审批者ID")
    private String auditUserId;
	/**审批人*/
	@Excel(name = "审批人", width = 15)
    @ApiModelProperty(value = "审批人")
    private String auditUsername;
	/**审核状态：0-未审核 1-审核中 2-已通过 3-已驳回*/
	@Excel(name = "审核状态：0-未审核 1-审核中 2-已通过 3-已驳回", width = 15, dicCode = "audit_status")
	@Dict(dicCode = "audit_status")
    @ApiModelProperty(value = "审核状态：0-未审核 1-审核中 2-已通过 3-已驳回")
    private Integer auditStatus;
	/**审批意见*/
	@Excel(name = "审批意见", width = 15)
    @ApiModelProperty(value = "审批意见")
    private String auditComments;
	/**首页推荐*/
	@Excel(name = "首页推荐", width = 15, dicCode = "is_home_recommended")
	@Dict(dicCode = "is_home_recommended")
    @ApiModelProperty(value = "首页推荐")
    private Integer isHomeRecommended;
	/**逻辑删除：1表示删除，0表示未删除。*/
	@Excel(name = "逻辑删除：1表示删除，0表示未删除。", width = 15)
    @ApiModelProperty(value = "逻辑删除：1表示删除，0表示未删除。")
    private Integer isDeleted;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @TableField(exist = false)
    private Integer pageNo;

    @TableField(exist = false)
    private Integer pageSize;

    @TableField(exist = false)
	private HTDateStatusEnum dateStatus;

    public HTDateStatusEnum getDateStatus() {
        if(Objects.isNull(dateStatus)){
            dateStatus = HTDateStatusEnum.ALL;
        }
        return dateStatus;
    }

    static public  String buildFullAddressBy(HTIndustryMeeting meeting, String provinceName, String cityName , String districtName ) {
        String address = "";
        String separator = " ";
        if (oConvertUtils.isNotEmpty(provinceName)) {
            address += provinceName;
        }
        if (oConvertUtils.isNotEmpty(cityName)) {
            address += (separator + cityName);
        }
        if (oConvertUtils.isNotEmpty(districtName)) {
            address += (separator + districtName);
        }
        if (oConvertUtils.isNotEmpty(meeting.streetAddress)) {
            address += (separator + meeting.streetAddress);
        }
        if (oConvertUtils.isNotEmpty(meeting.suiteAddress)) {
            address += (separator + meeting.suiteAddress);
        }

        return address;
    }

    @TableField(exist = false)
    private Object[] tagInfos;

    /**SEO关键字*/
    @Excel(name = "SEO关键字", width = 15)
    @ApiModelProperty(value = "SEO关键字")
    private String seoKeywords;


    /**SEO描述*/
    @Excel(name = "SEO描述", width = 15)
    @ApiModelProperty(value = "SEO描述")
    private String seoDescription;


}
